package com.liner.homework.second;

public class StringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder stringBuilder = new StringBuilder("hello world");

        stringBuilder.append(" hello earth");
        System.out.println("append:" + stringBuilder);

        stringBuilder.replace(0, 6, " happy ");
        System.out.println("replace:" + stringBuilder);

        stringBuilder.delete(7, 15);
        System.out.println("delete:" + stringBuilder);

        stringBuilder.insert(0, "I ");
        System.out.println("insert:" + stringBuilder);
    }
}
